home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl150e.zip / TIME.H < prev   
C/C++ Source or Header  |  1996-06-23  |  2KB  |  71 lines

  1. /*  time.h                               
  2.  
  3.     Struct and function declarations for dealing with time.
  4.  
  5. */
  6.  
  7. #ifndef __TIME_H
  8. #define __TIME_H
  9.  
  10. #ifndef _SIZE_T
  11. #define _SIZE_T
  12. typedef unsigned size_t;
  13. #endif
  14.  
  15. #ifndef  _TIME_T
  16. #define  _TIME_T
  17. typedef long time_t;
  18. #endif
  19.  
  20. #ifndef  _CLOCK_T
  21. #define  _CLOCK_T
  22. typedef long clock_t;
  23. #endif
  24.  
  25. #define CLOCKS_PER_SEC 1000.0
  26. #define CLK_TCK        1000.0
  27.  
  28. #define TZNAME "Eastern Standard Time"
  29. #define GMT_OFFS 7
  30.  
  31. struct tm
  32. {
  33.   int   tm_sec;
  34.   int   tm_min;
  35.   int   tm_hour;
  36.   int   tm_mday;
  37.   int   tm_mon;
  38.   int   tm_year;
  39.   int   tm_wday;
  40.   int   tm_yday;
  41.   int   tm_isdst;
  42. };
  43.  
  44. char *   asctime(const struct tm *__tblock);
  45. char *   ctime(const time_t *__time);
  46. double      difftime(time_t __time2, time_t __time1);
  47. struct tm * gmtime(const time_t *__timer);
  48. struct tm * localtime(const time_t *__timer);
  49. time_t      time(time_t *__timer);
  50. time_t        mktime(struct tm *__timeptr);
  51. clock_t     clock(void);
  52. size_t        strftime(char *__s, size_t __maxsize,
  53.                         const char *__fmt, const struct tm *__t);
  54. size_t        _lstrftime(char *__s, size_t __maxsize,
  55.                         const char *__fmt, const struct tm *__t);
  56.  
  57. int  *        __getDaylight(void);
  58. long *        __getTimezone(void);
  59. char * * __getTzname(void);
  60.  
  61. #define _daylight (*__getDaylight())
  62. #define _tzname   ( __getTzname())
  63. #define _timezone (*__getTimezone())
  64.  
  65. int                   stime(time_t *__tp);
  66. void         tzset(void);
  67. char *  _strdate(char *datestr);
  68. char *  _strtime(char *timestr);
  69.  
  70.  
  71. #endif  /* __TIME_H */